<!DOCTYPE HTML>
<html>
	<head>
        <meta charset="utf-8">
		<title>少年行</title>
        <script type="text/javascript" src="js/lib/jquery-2.1.4.min.js"></script>
        <script type="text/javascript">
            function setQuestIndex() {
                var index = $('#index').val();
                var state = $('#state').val();
                var armor = $('#armor').val()
                var byz = $('#byz').val();
                var data = JSON.parse(window.localStorage.data);

                data.quest.index = index;
                data.quest.state = state;
                data.armor = armor;
                data.player.skill.byz = byz;

                window.localStorage.data = JSON.stringify(data);
            }
            function getQuestIndex() {
                var data = JSON.parse(window.localStorage.data);
                $('#index').val(data.quest.index);
                $('#state').val(data.quest.state);
                $('#armor').val(data.armor);
                $('#byz').val(data.player.skill.byz);
            }
        </script>
	</head>
	<body>
            任务序列：<input type="text" id="index">，任务状态<input type="text" id="state">，武器<input type="text" id="armor">，半月斩<input type="text" id="byz"><br/>
            <input type="button" onclick="getQuestIndex();" value="获取"> | <input type="button" onclick="setQuestIndex();" value="设置">
	</body>
</html>